CxRsmCtl Methods
The CxRsmCtl object contains the following methods:
Configure
The Configure method launches a Properties dialog box for the connected RSM service.
Syntax
Configure()
Example
The following example calls Configure() on the CxHmiRsm object if a Site.Service is specified. This example is taken from the CxHmiRsm Example.
Sub btnConfigure_EventClick()
Dim This : Set This = btnConfigure
If CxHmiRsm.SiteService <> "" Then
CxHmiRsm.Configure
Else
MsgBox "No RSM service selected."
End If
End Sub
Delete
The Delete method prompts the user to delete the selected service(s) if the delete function is enabled.
Syntax
Delete()
Example
The following example deletes the selected service if delete is enabled for that service. This example is taken from the CxHmiRsm Example.
Sub btnDelete_EventClick()
Dim This : Set This = btnDelete
If CxHmiRsm.DeleteEnabled() Then
CxHmiRsm.Delete
Else
Dim strMsg
strMsg = "'Delete' is not enabled for one or more of the selected services."
strMsg = strMsg + " No selected services can be running, starting,"
strMsg = strMsg + " stopping, or failed."
MsgBox strMsg
End If
End Sub
DeleteEnabled
The DeleteEnabled method returns true if the delete function is enabled for the selected service(s).
Syntax
DeleteEnabled() As Boolean
Remark
This method checks the service info items of all of the selected services. If any one of the selected services is currently running, starting, stopping, or failed, this method will return false.
Example
The following example deletes the selected service if delete is enabled for that service. This example is taken from the CxHmiRsm Example.
Sub btnDelete_EventClick()
Dim This : Set This = btnDelete
If CxHmiRsm.DeleteEnabled() Then
CxHmiRsm.Delete
Else
Dim strMsg
strMsg = "'Delete' is not enabled for one or more of the selected services."
strMsg = strMsg + " No selected services can be running, starting,"
strMsg = strMsg + " stopping, or failed."
MsgBox strMsg
End If
End Sub
Kill
The Kill method prompts the user to kill the selected service(s) if the kill function is enabled.
Syntax
Kill()
Example
The following example kills the selected service if kill is enabled for that service. This example is taken from the CxHmiRsm Example.
Sub btnKill_EventClick()
Dim This : Set This = btnKill
If CxHmiRsm.KillEnabled() Then
CxHmiRsm.Kill
Else
strMsg = "'Kill' is not enabled for one or more of the selected services."
strMsg = strMsg + " All selected services must be either running,"
strMsg = strMsg + " starting, stopping, or failed."
MsgBox strMsg
End If
End Sub
KillEnabled
The KillEnabled method returns true if the kill function is enabled for the selected service(s).
Syntax
KillEnabled() As Boolean
Remark
This method checks the service info items of all of the selected services. If any one of the selected services is not currently running, starting, stopping, or failed, this method will return false.
Example
The following example kills the selected service if kill is enabled for that service. This example is taken from the CxHmiRsm Example.
Sub btnKill_EventClick()
Dim This : Set This = btnKill
If CxHmiRsm.KillEnabled() Then
CxHmiRsm.Kill
Else
strMsg = "'Kill' is not enabled for one or more of the selected services."
strMsg = strMsg + " All selected services must be either running,"
strMsg = strMsg + " starting, stopping, or failed."
MsgBox strMsg
End If
End Sub
New
The New method launches a New RSM Entry dialog box for the connected RSM service.
Syntax
New()
Example
The following example calls New() on the CxHmiRsm object if a Site.Service is specified. This example is taken from the CxHmiRsm Example.
Sub btnNew_EventClick()
Dim This : Set This = btnNew
If CxHmiRsm.SiteService <> "" Then
CxHmiRsm.New
Else
MsgBox "No RSM service selected."
End If
End Sub
Properties
The Properties method invokes a Properties dialog box for the selected service(s) if the properties function is enabled.
Syntax
Properties()
Example
The following example shows the properties for the selected service if the properties function is enabled for that service. This example is taken from the CxHmiRsm Example.
Sub btnProperties_EventClick()
Dim This : Set This = btnProperties
If CxHmiRsm.PropertiesEnabled() Then
CxHmiRsm.Properties
Else
strMsg = "'Properties' is only enabled when exactly one service is selected."
MsgBox strMsg
End If
End Sub
PropertiesEnabled
The PropertiesEnabled method returns true if the properties function is enabled for the selected service(s).
Syntax
PropertiesEnabled() As Boolean
Remark
This method will always return true if exactly one service in the list is selected.
Example
The following example shows the properties for the selected service if the properties function is enabled for that service. This example is taken from the CxHmiRsm Example.
Sub btnProperties_EventClick()
Dim This : Set This = btnProperties
If CxHmiRsm.PropertiesEnabled() Then
CxHmiRsm.Properties
Else
strMsg = "'Properties' is only enabled when exactly one service is selected."
MsgBox strMsg
End If
End Sub
Refresh
The Refresh method refreshes the list of services for the connected RSM service.
Syntax
Refresh()
Example
The following example calls Refresh() on the CxHmiRsm object if a Site.Service is specified. This example is taken from the CxHmiRsm Example.
Sub btnRefresh_EventClick()
Dim This : Set This = btnRefresh
If CxHmiRsm.SiteService <> "" Then
CxHmiRsm.Refresh
Else
MsgBox "No RSM service selected."
End If
End Sub
Restart
The Restart method prompts the user to restart the selected service(s) if the restart function is enabled.
Syntax
Restart()
Example
The following example restarts the selected service if restart is enabled for that service. This example is taken from the CxHmiRsm Example.
Sub btnRestart_EventClick()
Dim This : Set This = btnRestart
If CxHmiRsm.RestartEnabled() Then
CxHmiRsm.Restart
Else
strMsg = "'Restart' is not enabled for one or more of the selected services."
strMsg = strMsg + " All selected services must be either running, defined,"
strMsg = strMsg + " stopped, misconfigured, or stopped during startup."
MsgBox strMsg
End If
End Sub
RestartEnabled
The RestartEnabled method returns true if the restart function is enabled for the selected service(s).
Syntax
RestartEnabled() As Boolean
Remark
This method checks the service info items of all of the selected services. If any one of the selected services is not currently running, defined, stopped, misconfigured, or stopped during startup, this method will return false.
Example
The following example restarts the selected service if restart is enabled for that service.This example is taken from the CxHmiRsm Example.
Sub btnRestart_EventClick()
Dim This : Set This = btnRestart
If CxHmiRsm.RestartEnabled() Then
CxHmiRsm.Restart
Else
strMsg = "'Restart' is not enabled for one or more of the selected services."
strMsg = strMsg + " All selected services must be either running, defined,"
strMsg = strMsg + " stopped, misconfigured, or stopped during startup."
MsgBox strMsg
End If
End Sub
Start
The Start method prompts the user to start the selected service(s) if the start function is enabled.
Syntax
Start()
Example
The following example starts the selected service if start is enabled for that service. This example is taken from the CxHmiRsm Example.
Sub btnStart_EventClick()
Dim This : Set This = btnStart
If CxHmiRsm.StartEnabled() Then
CxHmiRsm.Start
Else
strMsg = "'Start' is not enabled for one or more of the selected services."
strMsg = strMsg + " All selected services must be either defined,"
strMsg = strMsg + " stopped, misconfigured, or stopped during startup."
MsgBox strMsg
End If
End Sub
StartEnabled
The StartEnabled method returns true if the start function is enabled for the selected service(s).
Syntax
StartEnabled() As Boolean
Remark
This method checks the service info items of all of the selected services. If any one of the selected services is not currently defined, stopped, misconfigured, or stopped during startup, this method will return false.
Example
The following example starts the selected service if start is enabled for that service. This example is taken from the CxHmiRsm Example.
Sub btnStart_EventClick()
Dim This : Set This = btnStart
If CxHmiRsm.StartEnabled() Then
CxHmiRsm.Start
Else
strMsg = "'Start' is not enabled for one or more of the selected services."
strMsg = strMsg + " All selected services must be either defined,"
strMsg = strMsg + " stopped, misconfigured, or stopped during startup."
MsgBox strMsg
End If
End Sub
Stop
The Stop method prompts the user to stop the selected service(s) if the stop function is enabled.
Syntax
Stop()
Example
The following example stops the selected service if stop is enabled for that service. This example is taken from the CxHmiRsm Example.
Sub btnStop_EventClick()
Dim This : Set This = btnStop
If CxHmiRsm.StopEnabled() Then
CxHmiRsm.Stop
Else
strMsg = "'Stop' is not enabled for one or more of the selected services."
strMsg = strMsg + " All selected services must be either running"
strMsg = strMsg + " or stopped during startup."
MsgBox strMsg
End If
End Sub
StopEnabled
The StopEnabled method returns true if the stop function is enabled for the selected service(s).
Syntax
StopEnabled() As Boolean
Remark
This method checks the service info items of all of the selected services. If any one of the selected services is not currently running or stopped during startup, this method will return false.
Example
The following example stops the selected service if stop is enabled for that service. This example is taken from the CxHmiRsm Example.
Sub btnStop_EventClick()
Dim This : Set This = btnStop
If CxHmiRsm.StopEnabled() Then
CxHmiRsm.Stop
Else
strMsg = "'Stop' is not enabled for one or more of the selected services."
strMsg = strMsg + " All selected services must be either running"
strMsg = strMsg + " or stopped during startup."
MsgBox strMsg
End If
End Sub


